package network;

import java.util.HashMap;

public class Edge {
    private Vertex vertex1;
    private Vertex vertex2;
    private int val;
    private HashMap<String, String> params;

    public Edge(Vertex vertex1, Vertex vertex2, int val, HashMap<String, String> params) {
        this.vertex1 = vertex1;
        this.vertex2 = vertex2;
        this.val = val;
        this.params = params;
    }

    public Vertex getVertex1() {
        return vertex1;
    }

    public Vertex getVertex2() {
        return vertex2;
    }

    public Vertex getOtherVertex(Vertex v) {
        if (v.equals(getVertex1()))
            return getVertex2();
        else
            return getVertex1();
    }
}
